<extend name="../Public/model" />
<block name="title">添加{$TITLE}</block>
<block name="body">
    <form class="form form-horizontal form-validate" id="form-ajax-Form" action="{:U('edit')}" method="post">
        <input type="hidden" name="cate_id" id="cate_id" value="{$detail['cate_id']}" />
        <div id="tab-system" class="HuiTab">
            <div class="tabBar cl"><span>基本设置</span><span>SEO设置</span><span>模板设置</span></div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">上级栏目：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <span class="select-box" style="width:150px;">
                            <select class="select" name="parent_id" size="1">
                                <option value="0">顶级栏目</option>
                                <volist name="cates" id="info">
                                    <in name="info.cate_level" value="1,2">
                                        <option value="{$info.cate_id}" <if condition="$info.cate_id eq $detail[parent_id]">selected</if>>{$info.cate_name}</option>
                                    </in>
                                </volist>
                            </select>
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>{$TITLE}名称：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" value="{$detail.cate_name}" datatype="*2-16" nullmsg="{$TITLE}名称不能为空" id="cate_name" name="cate_name">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>排序：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" value="{$detail.sort}" datatype="*1-5" nullmsg="排序不能为空" id="sort" name="sort">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">备注：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <textarea name="remark" cols="" rows="" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="$.Huitextarealength(this,100)">{$detail.remark}</textarea>
                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
                    </div>
                </div>
            </div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">SEO标题：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" value="{$detail.seo_title}" name="seo_title">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">SEO关键词：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" value="{$detail.seo_keywords}" name="seo_keywords">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">SEO描述：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <textarea name="seo_description" cols="" rows="" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="$.Huitextarealength(this,100)">{$detail.seo_description}</textarea>
                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
                    </div>
                </div>
            </div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">列表页模板：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <php>
                            $list_tpls=$tpl_list;
                            unset($list_tpls['list']);
                        </php>
                             <span class="select-box">
                                <select class="select" name="list_tpl">
                                    <option value="list">list{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                    <foreach name="list_tpls" item="vo">
                                        <php>$template_selected=$detail['list_tpl']==$vo?"selected":"";</php>
                                        <option value="{$vo}"{$template_selected}>{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>                                </foreach>
                                </select>
                             </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">文章页模板：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <php>
                            $article_tpls=$tpl_list;
                            unset($article_tpls['article']);
                        </php>
                            <span class="select-box">
                                <select class="select" name="article_tpl">
                                    <option value="article">article{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                    <foreach name="article_tpls" item="vo">
                                        <php>$template_selected=$detail['article_tpl']==$vo?"selected":"";</php>
                                        <option value="{$vo}"{$template_selected}>{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>                                </foreach>
                                </select>
                            </span>
                    </div>
                </div>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-8 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</block>
<block name="js">
    <script type="text/javascript">
        $(function(){
            $.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
        });
    </script>
</block>